package com.qd.common.panda.domain.entity.wallet.user;
import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户钱包退款记录
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class UserWalletRefundLogDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "退款ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "退款ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String refundId;
    /**
     * 退款金额
     */
    @NotNull(message = "退款金额不能为空", groups = DefaultGroup.class)
    private BigDecimal refundAmount;
    /**
     * 退赠送金额
     */
    private BigDecimal refundGiveAmount;
    /**
     * 退款编号
     */
    private Integer refundNo;
    /**
     * 退款状态:0退款中1退款成功2退款失败
     */
    private Integer refundStatus;
    /**
     * 退款状态显示
     */
    private String refundStatusDisplay;
    /**
     * 退款时间
     */
    private LocalDateTime refundTime;
    /**
     * 订单ID
     */
    @NotBlank(message = "订单ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "订单ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orderId;
    /**
     * 用户ID
     */
    @NotBlank(message = "用户ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "用户ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String userId;
    /**
     * 套餐编码
     */
    @NotBlank(message = "套餐编码不能为空", groups = DefaultGroup.class)
    @Size(max = 20, message = "套餐编码长度不能超过{max}位", groups = DefaultGroup.class)
    private String planCode;
    /**
     * 套餐编码显示
     */
    private String planCodeDisplay;
    /**
     * 操作人
     */
    @Size(max = 50, message = "操作人长度不能超过{max}位", groups = DefaultGroup.class)
    private String operator;
    /**
     * 操作人显示
     */
    private String operatorDisplay;
    /**
     * 操作组织
     */
    @Size(max = 50, message = "操作组织长度不能超过{max}位", groups = DefaultGroup.class)
    private String operateOrgId;
    /**
     * 操作组织显示
     */
    private String operateOrgIdDisplay;

    @Override
    public void freeData() {
        this.refundId = null;
        this.refundAmount = null;
        this.refundGiveAmount = null;
        this.refundNo = null;
        this.refundStatus = null;
        this.refundStatusDisplay = null;
        this.refundTime = null;
        this.orderId = null;
        this.userId = null;
        this.planCode = null;
        this.planCodeDisplay = null;
        this.operator = null;
        this.operatorDisplay = null;
        this.operateOrgId = null;
        this.operateOrgIdDisplay = null;
        super.freeData();
    }
}
